package cn.ultrarisk.scadmin.manager.biz.common.entity;

import cn.ultrarisk.mybatis.extension.annotation.Table;

import java.io.Serializable;
import java.util.LinkedHashMap;
import java.util.Map;


/**
 * 调度管理实体类
 *
 * @author sevendlong(lin23871@163.com)
 * @date 2014/4/14
 * @since V1.0
 */
@Table(table = "scheduler_job", idColumn = SchedulerJob.ID, autoIncrement = true)
public class SchedulerJob implements Serializable {
    private static final long serialVersionUID = -4179852633169599660L;

    /**
     * 启用状态
     */
    public static final int STATAUS_ENABLED = 1;
    /**
     * 禁用状态
     */
    public static final int STATAUS_DISABLED = 0;

    public final static String ID = "id";
    public final static String NAME = "name";
    public final static String STATUS = "status";
    public final static String BEAN = "bean";
    public final static String METHOD = "method";
    public final static String EXPRESSION = "expression";
    public final static String EXEC_COUNT = "exec_count";
    public final static String EXEC_TIME = "exec_time";
    public final static String REMARK = "remark";

    public static final Map<String, String> COLUMN_PROPERTY_MAP = new LinkedHashMap<String, String>();

    static {
        COLUMN_PROPERTY_MAP.put(ID, "id");
        COLUMN_PROPERTY_MAP.put(NAME, "name");
        COLUMN_PROPERTY_MAP.put(STATUS, "status");
        COLUMN_PROPERTY_MAP.put(BEAN, "bean");
        COLUMN_PROPERTY_MAP.put(METHOD, "method");
        COLUMN_PROPERTY_MAP.put(EXPRESSION, "expression");
        COLUMN_PROPERTY_MAP.put(EXEC_COUNT, "execCount");
        COLUMN_PROPERTY_MAP.put(EXEC_TIME, "execTime");
        COLUMN_PROPERTY_MAP.put(REMARK, "remark");
    }

    /**
     * id
     */
    private Integer id;
    /**
     * 名称
     */
    private String name;
    /**
     * 状态
     */
    private Integer status;
    /**
     * Spring Bean
     */
    private String bean;
    /**
     * 执行方法，bean的无参方法
     */
    private String method;
    /**
     * 表达式
     */
    private String expression;
    /**
     * 执行次数
     */
    private Long execCount;
    /**
     * 执行时长
     */
    private Double execTime;
    /**
     * 描述
     */
    private String remark;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getBean() {
        return bean;
    }

    public void setBean(String bean) {
        this.bean = bean;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getExpression() {
        return expression;
    }

    public void setExpression(String expression) {
        this.expression = expression;
    }

    public Long getExecCount() {
        return execCount;
    }

    public void setExecCount(Long execCount) {
        this.execCount = execCount;
    }

    public Double getExecTime() {
        return execTime;
    }

    public void setExecTime(Double execTime) {
        this.execTime = execTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

}